#!/usr/bin/env python
# -*- coding: utf-8 -*-#

#-------------------------------------------------------------------------------
# Name:         12
# Description:  
# Author:       handa
# Date:         2022/4/21
#-------------------------------------------------------------------------------
def out(k,num):
    def digit_index_factor_insidefunc():
        pos = 0
        while num > 0:
            temp = num % 10
            print(temp)
            if temp == k:
                print('enter k')
                return pos

            num = num // 10
            pos += 1
    return digit_index_factor_insidefunc
pos = out(3,30015)()
print(pos)
